home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7668 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  794 b 

  1. Path: isonews.bbn.hp.com!hpbblb!news
  2. From: Matthias Dittrich <matti>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Type casting
  5. Date: 26 Feb 1996 07:20:35 GMT
  6. Organization: Hewlett-Packard Co.
  7. Message-ID: <4grn03$2mv@hpbblb.bbn.hp.com>
  8. References: <3127dd4f.19010083@news.planet.net> <3127FF7A.6442C3B8@eden.com> <4gfnj1$gsc@calvin.risq.qc.ca>
  9. NNTP-Posting-Host: trabant.bbn.hp.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1N (X11; I; HP-UX A.09.07 9000/712)
  14. X-URL: news:4gfnj1$gsc@calvin.risq.qc.ca
  15.  
  16. It's a rounding problem. The cast only truncates your float number. If it
  17. is not exactly 254 or a little bit more, the result is 253. Rounding is
  18. discussed in one or two threads currently in this news group.
  19.  
  20. Good luck,
  21. Matthias
  22.  
  23.